package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_group_user的数据传输对象基类,直接与表对应<br>
 */
public abstract class GroupUserModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id;
    /**
     * 属性:username<br>
     */
    private String username;
    /**
     * 属性:password<br>
     */
    private String password;
    /**
     * 属性:name<br>
     */
    private String name;
    /**
     * 属性:address<br>
     */
    private String address;
    /**
     * 属性:addTime<br>
     */
    private Date addTime;
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime;
    /**
     * 属性:isShowDivide<br>
     */
    private Integer isShowDivide;
    /**
     * 属性:sortTime<br>
     */
    private Long sortTime;
    /**
     * 属性:opStatus<br>
     */
    private Integer opStatus;
    /**
     * 属性:groupId<br>
     */
    private Integer groupId;
    /**
     * 属性:level<br>
     */
    private Integer level;
    
    private String headImage;
    
    private Integer divideId;
    
    private String visitToken;
    
    private String levelStr;
    
    private String pushGZHPicUrl;
    
    private String pushGZHtitle;
    
    private String pushGZHDescribe;
    
    private String pushMessageUrl;
    
    private Integer isPushMessage;
    
    private Double borrowPresentMoney;
    
    private Integer giveBusinessIncome;
    
    private String mobile;

    /**
     *  默认构造方法,构造一个默认的GroupUserModelBase对象
     */
    public GroupUserModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public GroupUserModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.username = rs.getString("username");
               this.password = rs.getString("password");
               this.name = rs.getString("name");
               this.address = rs.getString("address");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.isShowDivide = rs.getInt("isShowDivide");
               this.sortTime = rs.getLong("sortTime");
               this.opStatus = rs.getInt("opStatus");
               this.groupId = rs.getInt("groupId");
               this.level = rs.getInt("level");
               this.headImage = rs.getString("headImage");
               this.divideId = rs.getInt("divideId");
               this.pushGZHPicUrl = rs.getString("pushGZHPicUrl");
               this.pushGZHtitle = rs.getString("pushGZHtitle");
               this.pushGZHDescribe = rs.getString("pushGZHDescribe");
               this.pushMessageUrl = rs.getString("pushMessageUrl");
               this.isPushMessage = rs.getInt("isPushMessage");
               this.borrowPresentMoney = rs.getDouble("borrowPresentMoney");
               this.giveBusinessIncome = rs.getInt("giveBusinessIncome");
               this.mobile = rs.getString("mobile");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }
    
    
    public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Integer getGiveBusinessIncome() {
		return giveBusinessIncome;
	}

	public void setGiveBusinessIncome(Integer giveBusinessIncome) {
		this.giveBusinessIncome = giveBusinessIncome;
	}

	public String getPushGZHPicUrl() {
		return pushGZHPicUrl;
	}

	public void setPushGZHPicUrl(String pushGZHPicUrl) {
		this.pushGZHPicUrl = pushGZHPicUrl;
	}

	public String getPushGZHtitle() {
		return pushGZHtitle;
	}

	public void setPushGZHtitle(String pushGZHtitle) {
		this.pushGZHtitle = pushGZHtitle;
	}

	public String getPushGZHDescribe() {
		return pushGZHDescribe;
	}

	public void setPushGZHDescribe(String pushGZHDescribe) {
		this.pushGZHDescribe = pushGZHDescribe;
	}

	public String getPushMessageUrl() {
		return pushMessageUrl;
	}

	public void setPushMessageUrl(String pushMessageUrl) {
		this.pushMessageUrl = pushMessageUrl;
	}

	public Integer getIsPushMessage() {
		return isPushMessage;
	}

	public void setIsPushMessage(Integer isPushMessage) {
		this.isPushMessage = isPushMessage;
	}

	public Double getBorrowPresentMoney() {
		return borrowPresentMoney;
	}

	public void setBorrowPresentMoney(Double borrowPresentMoney) {
		this.borrowPresentMoney = borrowPresentMoney;
	}

	public String getLevelStr() {
		return levelStr;
	}

	public void setLevelStr(String levelStr) {
		this.levelStr = levelStr;
	}

	public String getVisitToken() {
		return visitToken;
	}

	public void setVisitToken(String visitToken) {
		this.visitToken = visitToken;
	}

	public Integer getDivideId() {
		return divideId;
	}

	public void setDivideId(Integer divideId) {
		this.divideId = divideId;
	}

	public String getHeadImage() {
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性username<br>
     * @param username 待设置的属性username的值
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取属性username<br>
     * @return 属性username的值
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置属性password<br>
     * @param password 待设置的属性password的值
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取属性password<br>
     * @return 属性password的值
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置属性name<br>
     * @param name 待设置的属性name的值
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取属性name<br>
     * @return 属性name的值
     */
    public String getName() {
        return name;
    }

    /**
     * 设置属性address<br>
     * @param address 待设置的属性address的值
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 获取属性address<br>
     * @return 属性address的值
     */
    public String getAddress() {
        return address;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置属性isShowDivide<br>
     * @param isShowDivide 待设置的属性isShowDivide的值
     */
    public void setIsShowDivide(Integer isShowDivide) {
        this.isShowDivide = isShowDivide;
    }

    /**
     * 获取属性isShowDivide<br>
     * @return 属性isShowDivide的值
     */
    public Integer getIsShowDivide() {
        return isShowDivide;
    }

    /**
     * 设置属性sortTime<br>
     * @param sortTime 待设置的属性sortTime的值
     */
    public void setSortTime(Long sortTime) {
        this.sortTime = sortTime;
    }

    /**
     * 获取属性sortTime<br>
     * @return 属性sortTime的值
     */
    public Long getSortTime() {
        return sortTime;
    }

    /**
     * 设置属性opStatus<br>
     * @param opStatus 待设置的属性opStatus的值
     */
    public void setOpStatus(Integer opStatus) {
        this.opStatus = opStatus;
    }

    /**
     * 获取属性opStatus<br>
     * @return 属性opStatus的值
     */
    public Integer getOpStatus() {
        return opStatus;
    }

    /**
     * 设置属性groupId<br>
     * @param groupId 待设置的属性groupId的值
     */
    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    /**
     * 获取属性groupId<br>
     * @return 属性groupId的值
     */
    public Integer getGroupId() {
        return groupId;
    }

    /**
     * 设置属性level<br>
     * @param level 待设置的属性level的值
     */
    public void setLevel(Integer level) {
        this.level = level;
    }

    /**
     * 获取属性level<br>
     * @return 属性level的值
     */
    public Integer getLevel() {
        return level;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof GroupUserModelBase)) {
            return false;
        }

        final GroupUserModelBase otherModel = (GroupUserModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }
}
